home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / complib / firm1d.z / firm1d
Text File  |  1998-10-30  |  16KB  |  265 lines

  1.  
  2.  
  3.  
  4. ____FFFFIIIIRRRRMMMM1111DDDD((((3333FFFF))))                                                        ____FFFFIIIIRRRRMMMM1111DDDD((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SFIRM1D, DFIRM1D, CFIRM1D, ZFIRM1D - N 1D convolutions in the time
  10.      domain.
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee SSSSFFFFIIIIRRRRMMMM1111DDDD(((( ffff,,,, iiiinnnnccccffff,,,, llllddddffff,,,, iiiiffffxxxx0000,,,, nnnn____ffffxxxx,,,, nnnnyyyy,,,,
  14.                          gggg,,,, iiiinnnnccccgggg,,,,      iiiiggggxxxx0000,,,, nnnn____ggggxxxx,,,,
  15.                          hhhh,,,, iiiinnnncccchhhh,,,, llllddddhhhh,,,, iiiihhhhxxxx0000,,,, nnnn____hhhhxxxx,,,,
  16.                          aaaallllpppphhhhaaaa,,,, bbbbeeeettttaaaa ))))
  17.      iiiinnnntttteeeeggggeeeerrrr             iiiinnnnccccffff,,,, llllddddffff,,,, iiiiffffxxxx0000,,,, nnnn____ffffxxxx,,,, nnnnyyyy,,,,
  18.                          iiiinnnnccccgggg,,,, iiiiggggxxxx0000,,,, nnnn____ggggxxxx,,,,
  19.                          iiiinnnncccchhhh,,,, llllddddhhhh,,,, iiiihhhhxxxx0000,,,, nnnn____hhhhxxxx
  20.      rrrreeeeaaaallll                ffff((((llllddddffff,,,,nnnnyyyy)))),,,, gggg((((****)))),,,, hhhh((((llllddddhhhh,,,,nnnnyyyy)))),,,, aaaallllpppphhhhaaaa,,,, bbbbeeeettttaaaa
  21.  
  22.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee DDDDFFFFIIIIRRRRMMMM1111DDDD(((( ffff,,,, iiiinnnnccccffff,,,, llllddddffff,,,, iiiiffffxxxx0000,,,, nnnn____ffffxxxx,,,, nnnnyyyy,,,,
  23.                          gggg,,,, iiiinnnnccccgggg,,,,      iiiiggggxxxx0000,,,, nnnn____ggggxxxx,,,,
  24.                          hhhh,,,, iiiinnnncccchhhh,,,, llllddddhhhh,,,, iiiihhhhxxxx0000,,,, nnnn____hhhhxxxx,,,,
  25.                          aaaallllpppphhhhaaaa,,,, bbbbeeeettttaaaa ))))
  26.      iiiinnnntttteeeeggggeeeerrrr             iiiinnnnccccffff,,,, llllddddffff,,,, iiiiffffxxxx0000,,,, nnnn____ffffxxxx,,,, nnnnyyyy,,,,
  27.                          iiiinnnnccccgggg,,,, iiiiggggxxxx0000,,,, nnnn____ggggxxxx,,,,
  28.                          iiiinnnncccchhhh,,,, llllddddhhhh,,,, iiiihhhhxxxx0000,,,, nnnn____hhhhxxxx
  29.      ddddoooouuuubbbblllleeee pppprrrreeeecccciiiissssiiiioooonnnn    ffff((((llllddddffff,,,,nnnnyyyy)))),,,, gggg((((****)))),,,, hhhh((((llllddddhhhh,,,,nnnnyyyy)))),,,, aaaallllpppphhhhaaaa,,,, bbbbeeeettttaaaa
  30.  
  31.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee CCCCFFFFIIIIRRRRMMMM1111DDDD(((( ffff,,,, iiiinnnnccccffff,,,, llllddddffff,,,, iiiiffffxxxx0000,,,, nnnn____ffffxxxx,,,, nnnnyyyy,,,,
  32.                          gggg,,,, iiiinnnnccccgggg,,,,      iiiiggggxxxx0000,,,, nnnn____ggggxxxx,,,,
  33.                          hhhh,,,, iiiinnnncccchhhh,,,, llllddddhhhh,,,, iiiihhhhxxxx0000,,,, nnnn____hhhhxxxx,,,,
  34.                          aaaallllpppphhhhaaaa,,,, bbbbeeeettttaaaa ))))
  35.      iiiinnnntttteeeeggggeeeerrrr             iiiinnnnccccffff,,,, llllddddffff,,,, iiiiffffxxxx0000,,,, nnnn____ffffxxxx,,,, nnnnyyyy,,,,
  36.                          iiiinnnnccccgggg,,,, iiiiggggxxxx0000,,,, nnnn____ggggxxxx,,,,
  37.                          iiiinnnncccchhhh,,,, llllddddhhhh,,,, iiiihhhhxxxx0000,,,, nnnn____hhhhxxxx
  38.      ccccoooommmmpppplllleeeexxxx             ffff((((llllddddffff,,,,nnnnyyyy)))),,,, gggg((((****)))),,,, hhhh((((llllddddhhhh,,,,nnnnyyyy)))),,,, aaaallllpppphhhhaaaa,,,, bbbbeeeettttaaaa
  39.  
  40.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ZZZZFFFFIIIIRRRRMMMM1111DDDD(((( ffff,,,, iiiinnnnccccffff,,,, llllddddffff,,,, iiiiffffxxxx0000,,,, nnnn____ffffxxxx,,,, nnnnyyyy,,,,
  41.                          gggg,,,, iiiinnnnccccgggg,,,,      iiiiggggxxxx0000,,,, nnnn____ggggxxxx,,,,
  42.                          hhhh,,,, iiiinnnncccchhhh,,,, llllddddhhhh,,,, iiiihhhhxxxx0000,,,, nnnn____hhhhxxxx,,,,
  43.                          aaaallllpppphhhhaaaa,,,, bbbbeeeettttaaaa ))))
  44.      iiiinnnntttteeeeggggeeeerrrr             iiiinnnnccccffff,,,, llllddddffff,,,, iiiiffffxxxx0000,,,, nnnn____ffffxxxx,,,, nnnnyyyy,,,,
  45.                          iiiinnnnccccgggg,,,, iiiiggggxxxx0000,,,, nnnn____ggggxxxx,,,,
  46.                          iiiinnnncccchhhh,,,, llllddddhhhh,,,, iiiihhhhxxxx0000,,,, nnnn____hhhhxxxx
  47.      ddddoooouuuubbbblllleeee ccccoooommmmpppplllleeeexxxx      ffff((((llllddddffff,,,,nnnnyyyy)))),,,, gggg((((****)))),,,, hhhh((((llllddddhhhh,,,,nnnnyyyy)))),,,, aaaallllpppphhhhaaaa,,,, bbbbeeeettttaaaa
  48.  
  49.  
  50.  
  51. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  52.      ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooonnnnvvvv....hhhh>>>>
  53.  
  54.      vvvvooooiiiidddd ssssffffiiiirrrrmmmm1111dddd(((( ffffllllooooaaaatttt ****ffff,,,, iiiinnnntttt iiiinnnnccccffff,,,, iiiinnnntttt llllssssffff,,,, iiiinnnntttt iiiiffffxxxx0000,,,, iiiinnnntttt nnnn____ffffxxxx,,,,
  55.                   iiiinnnntttt nnnn____sssseeeeqqqq,,,,
  56.                   ffffllllooooaaaatttt ****gggg,,,, iiiinnnntttt iiiinnnnccccgggg,,,, iiiinnnntttt iiiiggggxxxx0000,,,, iiiinnnntttt nnnn____ggggxxxx,,,,
  57.                   ffffllllooooaaaatttt ****hhhh,,,, iiiinnnntttt iiiinnnncccchhhh,,,, iiiinnnntttt llllddddhhhh,,,, iiiinnnntttt iiiihhhhxxxx0000,,,, iiiinnnntttt nnnn____hhhhxxxx,,,,
  58.                   ffffllllooooaaaatttt aaaallllpppphhhhaaaa,,,, ffffllllooooaaaatttt bbbbeeeettttaaaa))))
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ____FFFFIIIIRRRRMMMM1111DDDD((((3333FFFF))))                                                        ____FFFFIIIIRRRRMMMM1111DDDD((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      vvvvooooiiiidddd ddddffffiiiirrrrmmmm1111dddd(((( ddddoooouuuubbbblllleeee ****ffff,,,, iiiinnnntttt iiiinnnnccccffff,,,, iiiinnnntttt llllddddffff,,,, iiiinnnntttt iiiiffffxxxx0000,,,, iiiinnnntttt nnnn____ffffxxxx,,,,
  75.                   iiiinnnntttt nnnn____sssseeeeqqqq,,,,
  76.                   ddddoooouuuubbbblllleeee ****gggg,,,, iiiinnnntttt iiiinnnnccccgggg,,,, iiiinnnntttt iiiiggggxxxx0000,,,, iiiinnnntttt nnnn____ggggxxxx,,,,
  77.                   ddddoooouuuubbbblllleeee ****hhhh,,,, iiiinnnntttt iiiinnnncccchhhh,,,, iiiinnnntttt llllddddhhhh,,,, iiiinnnntttt iiiihhhhxxxx0000,,,, iiiinnnntttt nnnn____hhhhxxxx,,,,
  78.                   ddddoooouuuubbbblllleeee aaaallllpppphhhhaaaa,,,, ddddoooouuuubbbblllleeee bbbbeeeettttaaaa))))
  79.  
  80.      vvvvooooiiiidddd ccccffffiiiirrrrmmmm1111dddd(((( ccccoooommmmpppplllleeeexxxx ****ffff,,,, iiiinnnntttt iiiinnnnccccffff,,,, iiiinnnntttt llllddddffff,,,, iiiinnnntttt iiiiffffxxxx0000,,,, iiiinnnntttt nnnn____ffffxxxx,,,,
  81.                   iiiinnnntttt nnnn____sssseeeeqqqq,,,,
  82.                   ccccoooommmmpppplllleeeexxxx ****gggg,,,, iiiinnnntttt iiiinnnnccccgggg,,,, iiiinnnntttt iiiiggggxxxx0000,,,, iiiinnnntttt nnnn____ggggxxxx,,,,
  83.                   ccccoooommmmpppplllleeeexxxx ****hhhh,,,, iiiinnnntttt iiiinnnncccchhhh,,,, iiiinnnntttt llllddddhhhh,,,, iiiinnnntttt iiiihhhhxxxx0000,,,, iiiinnnntttt nnnn____hhhhxxxx,,,,
  84.                   ccccoooommmmpppplllleeeexxxx ****aaaallllpppphhhhaaaa,,,, ccccoooommmmpppplllleeeexxxx ****bbbbeeeettttaaaa))))
  85.  
  86.      vvvvooooiiiidddd zzzzffffiiiirrrrmmmm1111dddd(((( zzzzoooommmmpppplllleeeexxxx ****ffff,,,, iiiinnnntttt iiiinnnnccccffff,,,, iiiinnnntttt llllddddffff,,,, iiiinnnntttt iiiiffffxxxx0000,,,, iiiinnnntttt nnnn____ffffxxxx,,,,
  87.                   iiiinnnntttt nnnn____sssseeeeqqqq,,,,
  88.                   zzzzoooommmmpppplllleeeexxxx ****gggg,,,, iiiinnnntttt iiiinnnnccccgggg,,,, iiiinnnntttt iiiiggggxxxx0000,,,, iiiinnnntttt nnnn____ggggxxxx,,,,
  89.                   zzzzoooommmmpppplllleeeexxxx ****hhhh,,,, iiiinnnntttt iiiinnnncccchhhh,,,, iiiinnnntttt llllddddhhhh,,,, iiiinnnntttt iiiihhhhxxxx0000,,,, iiiinnnntttt nnnn____hhhhxxxx,,,,
  90.                   zzzzoooommmmpppplllleeeexxxx ****aaaallllpppphhhhaaaa,,,,  zzzzoooommmmpppplllleeeexxxx ****bbbbeeeettttaaaa))))
  91.  
  92.  
  93.  
  94. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  95.      SFIRM1D, DFIRM1D, CFIRM1D and DFIRM1D compute N 1D convolutions in the
  96.      time domain :
  97.  
  98.       h(i,j) = beta * h(i,j) + alpha * Sum[ f(k,j) * g(i-k) ] with j=1,...,N
  99.  
  100.  
  101.  
  102. UUUUSSSSAAAAGGGGEEEE::::
  103.      1. Suppose you want to:
  104.            filter a 2D "image" f(0:449,0:699) along the first dimension ,
  105.         by  a 1D filter g(-15:15),
  106.            put the result in h(0:449,0:699),
  107.         you can use:
  108.  
  109.            call dfirm1d( 700,f(0,0),1,449-0+1,0,449,g(-15),1,-15,15,1.0,
  110.           $                      h(0,0),1,449-0+1,0,449,0.0)
  111.  
  112.      2. Suppose you want to:
  113.            filter a 2D "image" f(0:449,0:699) along the Second dimension ,
  114.         by  the Fisrt line of g(0:149,-15:15),
  115.            put the result in h(-25:449,0:699),
  116.         you can use:
  117.  
  118.                  call dfirm1d( 450,f(0,0),449-0+1,1,0,449,
  119.           $                      g(0,-15),149-25+1,-15,15,1.0,
  120.           $                      h(0,0),449-0+1,1,0,449,0.0)
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ____FFFFIIIIRRRRMMMM1111DDDD((((3333FFFF))))                                                        ____FFFFIIIIRRRRMMMM1111DDDD((((3333FFFF))))
  137.  
  138.  
  139.  
  140. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  141.      ffff       Vector containing sequence "f"
  142.  
  143.      iiiinnnnccccffff    Increment between two successive values   of "f"
  144.  
  145.      llllddddffff     Increment between two successive 1D sequnce of "f"
  146.  
  147.      iiiiffffxxxx0000    Index of the first element of each 1D sequence of "f"
  148.  
  149.      nnnn____ffffxxxx    Number of elements of each sequence of "f"
  150.  
  151.      nnnnyyyy      Number of 1D sequences to filter
  152.  
  153.  
  154.      gggg       Vector containing the 1D sequence "g"
  155.  
  156.      iiiinnnnccccgggg    Increment between two successive values of "g"
  157.  
  158.      iiiiggggxxxx0000    Index of the first element of each 1D sequence of "g"
  159.  
  160.      nnnn____ggggxxxx    Number of elements of Each sequence of "g"
  161.  
  162.  
  163.      hhhh       Vector containing the 2D sequence "h"
  164.  
  165.      iiiinnnncccchhhh    Increment between two successive values of "h"
  166.  
  167.      llllddddhhhh     Increment between two successive 1D sequnce of "h"
  168.  
  169.      iiiihhhhxxxx0000    Index of the first element of each 1D sequence of "h"
  170.  
  171.      nnnn____hhhhxxxx    Number of elements of Each sequence of "h"
  172.  
  173.  
  174.      aaaallllpppphhhhaaaa   Scaling factor for the original values of the "h" sequence
  175.  
  176.      bbbbeeeettttaaaa    Scaling factor for the convolution
  177.  
  178.  
  179.  
  180. IIIIMMMMPPPPOOOORRRRTTTTAAAANNNNTTTT NNNNOOOOTTTTEEEE::::
  181.            The array pointers must all point to the first element of the
  182.            array "(ifx0,ify0)", "(igx0,igy0)" and "(ihx0,ihy0)". If "f"
  183.            for example is defined as
  184.                 dimension f(-25:45,10:21)
  185.            Then "dfirm1d" must be called with the following parameters
  186.                 call dfirm1d( f(-25,10),(45-(-25)+1),-25,45,10,21 ... )
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ____FFFFIIIIRRRRMMMM1111DDDD((((3333FFFF))))                                                        ____FFFFIIIIRRRRMMMM1111DDDD((((3333FFFF))))
  203.  
  204.  
  205.  
  206. AUTHORS
  207.           Jean-Pierre Panziera, 1/12/93.
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.